package com.freesky.biz.activity.mapper;

import com.freesky.biz.activity.domain.TCouponBill;
import com.freesky.biz.activity.domain.TCouponBillSummary;
import com.freesky.biz.activity.domain.TStockMonitor;
import com.freesky.biz.activity.domain.TStockMonitorSummary;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponBillMapper {

    public List<TCouponBill> findList(TCouponBill entity);
    public List<TCouponBill> selectUnPushList(@Param("startDt")String startDt);
    public int updatePushFlag(@Param("id")String id,@Param("pushFlag")String pushFlag,@Param("pushMsg")String pushMsg);

    public TStockMonitorSummary selectSummaryData(TCouponBill entity);

    public List<TCouponBillSummary> selectBillSummaryList(TCouponBill entity);

    public int deleteBillByConsumeTime(@Param("stockId")String stockId,
                                       @Param("startDt")String startDt,
                                 @Param("endDt")String endDt);

    public int addBatchOrUpdate(@Param("couponBills") List<TCouponBill> couponBills);
    public int updateEmptyBankNo(@Param("stockId")String stockId,
                                 @Param("consumeTime")String consumeTime);
    //报表
    public String selectMaxUpdateDate();
    public String selectMinConsumeTime(@Param("updateDate") String updateDate);
    public int addCouponReportDay(@Param("startDt") String startDt,
                                  @Param("endDt") String endDt);

    public int updateStockMonitorReport(@Param("startDt") String startDt,
                                        @Param("endDt") String endDt);

    //南平统计
    public int updateNanpingReferrer();

    //南平工银社区节
    public int updateNanpingPartner();

    //更新核销状态（微信）
    public int updateConsumStatus();
}
